package com.mxpio.erp.common.technology.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.technology.entity.ItemGroup;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper=false)
@Schema(description="Bom")
public class BomInfoLineVO extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Schema(description = "BomLine主键")
	private String bomLineId;


	@Schema(description = "Bom主键")
	private String bomId;

	@Schema(description = "行号")
	private String lineNo;



	@Schema(description = "子项物料编号")
	private String itemCode;

	@Schema(description = "子项物料名称")
	private String itemName ;

	@Schema(description = "子项物料规格型号")
	private String itemSpec;

	@Schema(description = "子项物料图号")
	private String drawingNo;

	@Schema(description = "子项物料组")
	@Dict(dicCode="groupCode", dicEntity = ItemGroup.class, dicText = "groupName")
	private String itemProp;

	/*@Schema(description = "子项物料基本用量")
	private BigDecimal itemConsumption;*/

	@Schema(description = "生效日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date beginTime;

	@Schema(description = "失效日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date endTime;

	/*@Schema(description = "损耗率")
	private BigDecimal wastage;

	@Schema(description = "下料长度")
	private BigDecimal makeLength;

	@Schema(description = "下料面积")
	private BigDecimal makeArea;

	@Schema(description = "可制数量")
	private BigDecimal makeNum;

	@Schema(description = "是否材料")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String material;

	@Schema(description = "材料类型")
	@Dict(dicCode = "ERP_TECH_MATERIAL_TYPE")
	private String materialType;

	@Transient
	@Schema(description = "是否有下级物料，0-无 1-有")
	private Boolean hasSub;*/

	//230414添加：物料材料属性同名字段
	@Schema(description = "材料牌号")
	private String materialBrand;


	@Schema(description = "父项物料编号")
	private String parentCode;

	@Schema(description = "父项物料名称")
	private String parentName;

	@Schema(description = "父项物料型号")
	private String parentSpec;

	@Schema(description = "父项物料单位")
	@Dict(dicCode="ERP_TECH_UNIT_CODE")
	private String parentUnit;

	@Schema(description = "父项图号")
	private String parentDrawingNo;


	@Schema(description = "顶级物料编号")
	private String topCode;

	@Schema(description = "顶级物料名称")
	private String topName;

	@Schema(description = "顶级物料型号")
	private String topSpec;

	@Schema(description = "顶级物料单位")
	@Dict(dicCode="ERP_TECH_UNIT_CODE")
	private String topUnit;

	@Schema(description = "顶级物料图号")
	private String topDrawingNo;
}
